<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <img v-if="isShow" src="../../images/图片1.gif" alt="" srcset="">
        <img v-if="age>10" src="../../images/图片1.gif" alt="" srcset="">
        <button @click="hide">隐藏/显示</button>
    </div>
    <script src="../../js/vue.js"></script>
    <script>
        var vue = new Vue({
            el: '#app',
            data: {
                age: 9,
                isShow: 'true'
            },
            methods: {
                hide: function() {
                    this.isShow = !this.isShow;
                }
            },
        });
    </script>
</body>
</html>